//
//  ProposeNewEventViewController.h
//  SecretRoom
//
//  Created by Sitdhibhong Laokok on 9/4/54 BE.
//  Copyright 2554 App Tree. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>
#import "ProposeNewEventInformationConfigurationDelegate.h"

@interface ProposeNewEventViewController : UITableViewController <ProposeNewEventInformationConfigurationDelegate, CLLocationManagerDelegate, MKMapViewDelegate, UITextFieldDelegate> {
    NSManagedObjectContext *context;
    
    MKMapView *eventMapView;

    CLLocationManager *locationManager;
    CLLocationCoordinate2D locationCoordinate;
    
    NSDateFormatter *dateFormatter;
    NSCalendar *gregorian;
    NSDateComponents *dateComponents;
    
    // Control
    UITextField *eventNameField;
    UITextView *noteForEventView;
    
    BOOL isUserLocation;
}

@property (nonatomic, retain) NSDateFormatter *dateFormatter;
@property (nonatomic, retain) NSManagedObjectContext *context;
@property (nonatomic, retain) CLLocationManager *locationManager;
@property (nonatomic, assign) CLLocationCoordinate2D locationCoordinate;

- (id)initWithStyle:(UITableViewStyle)style withContext:(NSManagedObjectContext *)context;

- (void)cancelProposeNewEventButtonClicked;
- (void)saveProposeNewEventButtonClicked;

- (void)longtimePressedToDropPinOnEventLocationMap:(UILongPressGestureRecognizer *)gesture;

@end
